home *** CD-ROM | disk | FTP | other *** search
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Back to the Roots
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` By Rich Davey (rich@fatal-design.com)
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Music listened to while coding this
- ` Headrush CD 2 (The Tidy Boys Mix)
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` Note: This was just made for "fun"
- ` and to show how to use my scroller
- ` routine - and also to re-create those
- ` classic demo days :-)
-
- sync rate 0
- sync on
- hide mouse
-
- x=0 : y=0 : ox=32 : oy=25 : os=2 : s=8 : bw#=ox*os
-
- load bitmap "demo_2.bmp",31
- load image "demo_3.bmp",10000
- load bitmap "knight6.bmp",1
-
- set current bitmap 1
-
- for i=1 to 60
-
- get image i,x,y,x+ox,y+oy
- inc x,ox
-
- if x>=319
- x=0
- inc y,oy
- endif
-
- sync
-
- next i
-
- i=1
-
- create bitmap 2,640,480
-
- if os>1
-
- for z=61 to 120
-
- create bitmap 1,ox*os,oy*os
- paste image i,0,0
- set current bitmap 2
- copy bitmap 1,0,0,ox,oy,2,0,0,ox*os+os,oy*os
- get image z,0,0,ox*os+os,oy*os
- inc i
-
- next z
-
- else
-
- print "Cannot have OS size less than 2"
- end
-
- endif
-
- set current bitmap 0
- delete bitmap 2
-
- bc=640/bw#+1
-
- for a=1 to bc
-
- st$=st$+" "
-
- next a
-
- read s$
- st$=st$+s$
- lot=len(st$)+1
- if lot<12 then st$=st$+" "
-
- dim x#(bc)
- dim t$(bc)
-
- for a=1 to bc
-
- x#(a)=bw#*a
- t$(a)=mid$(st$,a)
- as=asc(t$(a))
- sprite a,x#(a),0,29+as
- set sprite a,0,1
-
- next a
-
- y=(480-oy)/2 : t=bc
-
- randomize 1000
- stars=150
-
- dim stx#(stars)
- dim sty#(stars)
-
- for i = 1 to stars
- stx#(i)=rnd(640.0)-320.0
- sty#(i)=rnd(480.0)-240.0
- next i
-
- sx#=1.03985 : sy#=1.03985
- slidex#=320.0 : slidey#=240.0
-
- dim sine#(360)
-
- for y=0 to 360
- x#=sin(y)
- sine#(y)=x#*200
- next y
-
- load image "demo_1.bmp",250
-
- for cospr=250 to 300
- sprite cospr,-256,0,250
- set sprite cospr,0,1
- next cospr
-
- spr=2 : i=1 : speed=4
-
- ink rgb(255,255,255),0 : ot=timer() : raster$="off" : y=0
-
- dim sine#(360)
-
- do
-
- cls 0
-
- paste image 10000,180,285
-
- if timer()>ot+5000 then raster$="on"
- if timer()>ot+13000 then star$="on"
- if timer()>ot+30000 then ball$="on"
-
- if raster$="on"
-
- inc ry
- if ry=480-(oy*os) then ry=0
-
- set current bitmap 31
- get image 121,0,ry,640,ry+(oy*os)-8
- set current bitmap 0
-
- paste image 121,0,153+sin(y)*100
-
- endif
-
- for a=1 to bc
-
- x#=x#(a)
-
- dec x#,s
-
- if x#=<-0-bw#
- x#(a)=640
- inc t
- if t=lot
- t=1
- read st$
- if st$="*"
- restore
- read st$
- endif
- lot=len(st$)+1
- endif
- t$(a)=mid$(st$,t)
- else
- x#(a)=x#
- endif
-
- as=asc(t$(a))
- sprite a,x#(a),150+sin(y)*100,29+as
-
- next a
-
- if star$="on"
-
- for j=1 to stars
- dot stx#(j)+slidex#,sty#(j)+slidey#
- stx#(j)=stx#(j)*sx#
- sty#(j)=sty#(j)*sy#
- if stx#(j) > 640.0 then stx#(j)=stx#(j)-640.0
- if sty#(j) > 480.0 then sty#(j)=sty#(j)-480.0
- if stx#(j) < -640.0 then stx#(j)=stx#(j)+640.0
- if sty#(j) < -480.0 then sty#(j)=sty#(j)+480.0
- next j
-
- endif
-
- if ball$="on"
-
- for cx=1 to 22
-
- sprite 249+cx,200+(cx*6)+cos(wrapvalue(d+(cx*10)))*100,100+(cx*8)+sin(wrapvalue(d+cx*6))*100,250
-
- next cx
-
- spr=spr+speed
- if spr>129 then spr=2
- i=1 : inc d,2
-
- endif
-
- inc y
- if y=360 then y=0
-
- if spacekey() then end
-
- sync
-
- loop
-
- data "HEY... HOW ABOUT SOME RASTERS? YEAAHHHH... DARKFORGE KICKS IT AGAIN! "
- data "OKAY, STARS ANYONE? ........... "
- data "LOVELY ISN'T IT? AND YES, THERE IS MORE TO COME! THIS MIGHT "
- data "KILL YOUR MACHINE, SORRY! BUT BRING ON THE BALLS! .............. "
- data "OKAY IT IS TIME FOR THE GREETINGS OF COURSE! "
- data "KUDOS FLY OUT TO.. TRACER! (THE SMOKING DRINKING CODING MASTER), "
- data "LEE (MAY WE BOW TO YOU!), PJAY, SI, WARPY, CHRIS, ARBITAGE AND THE REST OF "
- data "THE MOB ON IRC.CJB.NET ! THIS IS RICH DOING THAT WRAP THING ..."
- data " "
- data "*"
-
-